<?php

ini_set( 'display_errors', 'On' );
error_reporting( E_ALL );

include_once(getcwd() . '/InterfacePhpthumb.php');
include_once(getcwd() . '/Tools.php');
include_once(getcwd() . '/ImageAdapter.php');
include_once(getcwd() . '/jpgImage.php');
include_once(getcwd() . '/pngImage.php');
include_once(getcwd() . '/gifImage.php');
include_once(getcwd() . '/phpThumbCreator.php');


$adapter = new jpgImage();

$phpThumbObj = new phpThumbCreator();
$phpThumbObj->setAdapter($adapter);

$phpThumbObj->SourceFileDest('SourcePics\Sunset.jpg');
$phpThumbObj->ThumbFileDest('ThumbPics');
$phpThumbObj-> ThumbFileDimensions('60', '60');
echo $phpThumbObj->getSourcePath().'<br>';
$thumbImage= $phpThumbObj->CreateThumbImage();
if($thumbImage!=FALSE){
	echo $thumbImage." thumb Image created sucessfully!";
}else {
	echo "Thumb Image not created..";
}
